import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Fk
import Fk.Components.LunarLTK
import Fk.Pages.LunarLTK
import Fk.Components.Common
import Qt5Compat.GraphicalEffects

ColumnLayout {
  id: root
  anchors.fill: parent
  property var extra_data: ({ name: "", data: ({ text : "" }) })
  signal finish()

  BigGlowText {
    Layout.fillWidth: true
    Layout.preferredHeight: childrenRect.height + 4

    text: Lua.tr(extra_data.name)
  }

  ListView {
    id: body
    Layout.fillWidth: true
    Layout.fillHeight: true

    clip: true
    spacing: 20

    Column {
      width: parent.width
      spacing: 20

      Text {
        width: body.width
        font.pixelSize: 18
        color: "#E4D5A0"
        text: "ExtraDamage:" +  (extra_data?.data?.damage ?? 0).toString()

        wrapMode: Text.WordWrap
      }

      TextEdit {
        width: body.width
        font.pixelSize: 18
        color: "#E4D5A0"
        text: extra_data?.data?.text || ""

        readOnly: true
        selectByKeyboard: true
        selectByMouse: false
        wrapMode: TextEdit.WordWrap
        textFormat: TextEdit.RichText
      }

    }
  
  }

}

